
/*
 * Copyright 2002-2022 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 *版权所有2002-2022原作者。
 *
 *根据Apache许可证2.0版许可（“许可证”）；
 *除非符合许可证的规定，否则您不得使用此文件。
 *您可以在以下网址获取许可证副本：
 *
 *https://www.apache.org/licenses/LICENSE-2.0
 *
 *除非适用法律要求或书面同意，软件
 *根据许可证进行的分发是在“按原样”的基础上进行的，
 *无任何明示或暗示的保证或条件。
 *有关管理权限的特定语言，请参阅许可证和
 *许可证下的限制。
 */

package org.springframework.ui.context;

import org.springframework.lang.Nullable;

/**
 * Interface to be implemented by objects that can resolve {@link Theme Themes}.
 * This enables parameterization and internationalization of messages
 * for a given 'theme'.
 *
 * @author Jean-Pierre Pawlak
 * @author Juergen Hoeller
 * @see Theme
 * @deprecated as of 6.0 in favor of using CSS, without direct replacement
 */
/**
 *要由可以解析｛@link Theme Themes｝的对象实现的接口。
 *这样可以实现消息的参数化和国际化
 *对于给定的“主题”。
 *
 *@作者Jean-Pierre Pawlak
 *@作者于尔根·霍勒
 *@查看主题
 *@从6.0起已弃用，支持使用CSS，无需直接替换
 */
@Deprecated(since = "6.0")
public interface ThemeSource {

	/**
	 * Return the Theme instance for the given theme name.
	 * <p>The returned Theme will resolve theme-specific messages, codes,
	 * file paths, etc (e.g. CSS and image files in a web environment).
	 * @param themeName the name of the theme
	 * @return the corresponding Theme, or {@code null} if none defined.
	 * Note that, by convention, a ThemeSource should at least be able to
	 * return a default Theme for the default theme name "theme" but may also
	 * return default Themes for other theme names.
	 * @see org.springframework.web.servlet.theme.AbstractThemeResolver#ORIGINAL_DEFAULT_THEME_NAME
	 */
	/**
	 *返回给定主题名称的主题实例。
	 *<p>返回的主题将解析特定于主题的消息、代码，
	 *文件路径等（例如web环境中的CSS和图像文件）。
	 *@param theme命名主题的名称
	 *@返回相应的Theme，如果未定义，则返回｛@code null｝。
	 *请注意，按照惯例，主题源至少应该能够
	 *为默认主题名称“主题”返回默认主题，但也可以
	 *为其他主题名称返回默认主题。
	 *@参见org.springframework.web.servlet.theme.AbstractThemeResolver#ORIGINAL_DEFAULT_theme_NAME
	 */
	@Nullable
	Theme getTheme(String themeName);

}
